#include <string>
#include <sstream>
#include <cctype>
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include "HashTable.h"

int main(int argc, char* argv[])
{
    HashTable slot;

    std::ifstream inFile;
    inFile.open("alibaba.txt");

    if (!inFile.is_open())
    {
        std::cout << "Could not open the file " << std::endl;
        exit(EXIT_FAILURE);
    }
    std::string str;
    
    while (inFile >> str)
    {
        std::string s;
        for (char i : str)
        {
            if (isalpha(i))
                s += tolower(i);
        }
        slot.insert(s);
    }



    for(int i = 0; i<20; i++)
    {
        std::cout << "No." << i+1 << ":  ";
        slot.display();
    }

 
    
    return 0;
}